//
// Created by ZLY on 2025/3/29.
//

#ifndef AVPACKETQUEUE_H
#define AVPACKETQUEUE_H


#include "Queue.h"
#include "Log.h"

extern "C" {
#include <libavcodec/packet.h>
}

class AVPacketQueue : Queue<AVPacket *> {
public:
    AVPacketQueue();

    ~AVPacketQueue();

    void Abort();


    int Size();

    int Push(AVPacket *pkt);

    AVPacket *Pop(const int timeout);

private:
    Queue<AVPacket *> queue_;

    void release();
};


#endif //AVPACKETQUEUE_H
